class Person:
    def __init__(self, name, age, email, height, weight):
        self.name = name
        self.age = age
        self.email = email
        self.height = height  # height in centimeters
        self.weight = weight  # weight in kilograms

    def greet(self):
        """Greet the person with a custom message."""
        print(f"Hello, my name is {self.name}!")

    def get_age(self):
        """Return the age of the person."""
        return self.age

    def calculate_bmi(self):
        """Calculate and return the BMI of the person."""
        bmi = self.weight / ((self.height / 100) ** 2)
        return bmi

if __name__ == "__main__":
    person = Person(name="Alice", age=30, email="alice@example.com", height=165, weight=60)
    person.greet()
    print(f"{person.name} is {person.get_age()} years old.")
    bmi = person.calculate_bmi()
    print(f"{person.name}'s BMI is {bmi:.2f}")


################################################################################

class Car:
    def __init__(self, make, model, year):
        self.make = make
        self.model = model
        self.year = year

    def start_engine(self):
        print(f"Starting the engine of {self.make} {self.model} ({self.year})")

class ElectricCar(Car):
    def __init__(self, make, model, year, battery_capacity, range_per_charge):
        super().__init__(make, model, year)
        self.battery_capacity = battery_capacity  # in kWh
        self.range_per_charge = range_per_charge  # in kilometers

    def recharge(self):
        print(f"Recharging the battery of {self.make} {self.model} with a capacity of {self.battery_capacity} kWh")

class LuxuryCar(Car):
    def __init__(self, make, model, year, leather_seats, premium_sound_system):
        super().__init__(make, model, year)
        self.leather_seats = leather_seats  # boolean
        self.premium_sound_system = premium_sound_system  # boolean

    def upgrade_interior(self):
        if not self.leather_seats:
            self.leather_seats = True
            print(f"Upgraded {self.make} {self.model} to include leather seats")
        if not self.premium_sound_system:
            self.premium_sound_system = True
            print(f"Upgraded {self.make} {self.model} to include a premium sound system")

class FamilyCar(Car):
    def __init__(self, make, model, year, seating_capacity, storage_volume):
        super().__init__(make, model, year)
        self.seating_capacity = seating_capacity  # number of seats
        self.storage_volume = storage_volume  # in cubic feet

    def add_car_seat(self):
        if self.seating_capacity > 4:
            print(f"Adding a car seat to {self.make} {self.model} (current seating capacity: {self.seating_capacity})")
        else:
            print(f"Cannot add car seat to {self.make} {self.model} (max seating capacity reached)")


if __name__ == "__main__":
    tesla_model_s = ElectricCar(make="Tesla", model="Model S", year=2023, battery_capacity=100, range_per_charge=500)
    tesla_model_s.start_engine()
    tesla_model_s.recharge()

    bmw_7_series = LuxuryCar(make="BMW", model="7 Series", year=2023, leather_seats=True, premium_sound_system=False)
    bmw_7_series.start_engine()
    bmw_7_series.upgrade_interior()

    toyota_sienna = FamilyCar(make="Toyota", model="Sienna", year=2023, seating_capacity=7, storage_volume=40)
    toyota_sienna.start_engine()
    toyota_sienna.add_car_seat()